﻿@using FwProject.Settlement.Dto
@model List<CapitalPoolDto>
@{
    Layout = null;
}
<div id="table_print">
    <table class="table table-bordered table-hover table-rowselected" style="width:50%">
        <thead>
            <tr>
                @*<th style="width:45px"></th>*@
                <th>账户名称</th>
                <th>本日收入</th>
                <th>本日支出</th>
                <th>余额</th>
            </tr>
        </thead>
        <tbody>
            @if (Model.Count == 0)
            {
                <tr><td colspan="4" align="center">暂无数据</td></tr>
            }
            else
            {
                foreach (var item in Model)
                {
                    <tr>
                        <td>@item.AccountName</td>
                        <td>@item.DailyIncome</td>
                        <td>@item.DailyExpenditure</td>
                        <td>@item.Balance</td>
                    </tr>
                }
                <tr class="footer" style="color:red">
                    <td>合计</td>
                    <td>@Model.Sum(o=>o.DailyIncome)</td>
                    <td>@Model.Sum(o => o.DailyExpenditure)</td>
                    <td>@Model.Sum(o => o.Balance)</td>
                </tr>
            }
        </tbody>
    </table>
</div>

